#!/bin/bash

echo 进程开始，正在绕过手机，本脚本仅适用于12.4.5-12.4.7的有重认证激活的手机！

rm -rf ~/.ssh/known_hosts

cd ~/Desktop/SSHPASS

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 mount -o rw,union,update /

./sshpass -p alpine scp -rP 1025 -o StrictHostKeyChecking=no ./bypass root@localhost:/usr/libexec/bypass1

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 mv /usr/libexec/mobileactivationd /usr/libexec/mobileactivationdbak

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 mv /usr/libexec/bypass /usr/libexec/mobileactivationd

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 chmod 755 /usr/libexec/mobileactivationd

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 launchctl unload /System/Library/LaunchDaemons/com.apple.mobileactivationd.plist

echo 激活文件注入成功！请等待设置部署过程完成！

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 launchctl load /System/Library/LaunchDaemons/com.apple.mobileactivationd.plist

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 uicache -a

sleep 15

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 killall backboardd

echo 绕过完毕，enjoy！
